const ava = require('ava')
const app = require('./helpers/app')

const config = require('./helpers/config')
const { success, error } = config
const {FOUNDATION_PREFIX, SERVICE_TOKEN} = require('../../config')

const {
    POINT,
    } = config.modules


let module_itemId = 'sophic_997'
let createdAt_1 = '1504754903419'
let createdAt_2 = '1504754985093'
let createdAt_3 = '1504755054065'



ava.serial('[200] add point detail_1', async t => {
    const res = await app
        .post(`${POINT}`)
        .send({
            module_itemId: module_itemId,
            createdAt: createdAt_1
        })
        .ava(t)
})

ava.serial('[200] add point detail_2', async t => {
    const res = await app
        .post(`${POINT}`)
        .send({
            module_itemId: module_itemId,
            createdAt: createdAt_2
        })
        .ava(t)
})

ava.serial('[200] add point detail_3', async t => {
    const res = await app
        .post(`${POINT}`)
        .send({
            module_itemId: module_itemId,
            createdAt: createdAt_3
        })
        .ava(t)
})


ava.serial('[200] get user point detail', async t => {
    const res = await app
        .get(`${POINT}/user/99/detail`)
        .ava(t)
})



